using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class ServiceGroup
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _ServiceCode;

		public string ServiceCode
		{
			get { return _ServiceCode; }
			set { _ServiceCode = value; }
		}

		private string _ServiceName;

		public string ServiceName
		{
			get { return _ServiceName; }
			set { _ServiceName = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public ServiceGroup()
		{ }

		public ServiceGroup(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string ServiceCode,string ServiceName,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.ServiceCode = ServiceCode;
			this.ServiceName = ServiceName;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",ServiceCode = " + ServiceCode + ",ServiceName = " + ServiceName + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<ServiceGroup>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ServiceGroup> Membres
			int System.Collections.Generic.IComparer<ServiceGroup>.Compare(ServiceGroup x, ServiceGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class ServiceCodeComparer : System.Collections.Generic.IComparer<ServiceGroup>
		{
			public SorterMode SorterMode;
			public ServiceCodeComparer()
			{ }
			public ServiceCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ServiceGroup> Membres
			int System.Collections.Generic.IComparer<ServiceGroup>.Compare(ServiceGroup x, ServiceGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ServiceCode.CompareTo(x.ServiceCode);
				}
				else
				{
					return x.ServiceCode.CompareTo(y.ServiceCode);
				}
			}
			#endregion
		}
		public class ServiceNameComparer : System.Collections.Generic.IComparer<ServiceGroup>
		{
			public SorterMode SorterMode;
			public ServiceNameComparer()
			{ }
			public ServiceNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ServiceGroup> Membres
			int System.Collections.Generic.IComparer<ServiceGroup>.Compare(ServiceGroup x, ServiceGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ServiceName.CompareTo(x.ServiceName);
				}
				else
				{
					return x.ServiceName.CompareTo(y.ServiceName);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<ServiceGroup>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ServiceGroup> Membres
			int System.Collections.Generic.IComparer<ServiceGroup>.Compare(ServiceGroup x, ServiceGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
